<template>
  <div class="infosafet">
    <div class="theme">
      <div class="wrapper">
        <h1 class="title">信息安全风险评估</h1>
        <h2 class="desc">
          针对被评估系统涉及到的网络系统、部署环境、数据、人力资源等进行风险识别，全面了解和掌握系统面临的信息安全威胁和风险，为信息系统的使用管理部门开展信息安全建设提供依据，为确立安全策略、制定安全规划、开展安全建设提供决策建议。
        </h2>
        <el-button
        class="banner-button"
        size="large"
        type="primary"
        round
        @click="openForm"
      >
        立即体验
      </el-button>
      </div>
      
    </div>
    <div class="section" style="background-image: none">
      <div class="wrapper">
        <h2 id="yjbz" class="section-title">依据标准</h2>
        <div class="section-content">
          <p class="sub-desc">
            《信息安全技术 信息安全风险评估方法》GB/T 20984-2022；<br />
            《信息安全技术 信息安全风险评估实施指南》GB/T 31509-2015；<br />
            《信息技术安全技术 信息技术安全性评估准则》GB/T 18336-2015；<br />
            《信息安全技术 网络安全等级保护基本要求》GB/T 22239-2019；<br />
            《信息安全技术 信息系统安全等级保护实施指南》GB/T 25058-2019；<br />
          </p>
        </div>
      </div>
    </div>
    <div
      class="section"
      style="background-image: none; background-color: #f7f7f7"
    >
      <div class="wrapper">
        <h2 id="pgff" class="section-title">风险评估方法</h2>
        <ul class="list-wrapper">
          <li class="list-item">
            <div class="content">
              <div class="title">访谈</div>
            </div>
          </li>
          <li class="list-item">
            <div class="content">
              <div class="title">检查</div>
            </div>
          </li>
          <li class="list-item">
            <div class="content">
              <div class="title">测试</div>
            </div>
          </li>
        </ul>
      </div>
    </div>
    <div class="section" style="background-image: none">
      <div class="wrapper">
        <h2 id="pggj" class="section-title">风险评估工具</h2>
        <ul class="list-wrapper">
          <li class="list-item">
            <div class="content">
              <div class="title">漏洞扫描工具AppScan</div>
            </div>
          </li>
          <li class="list-item">
            <div class="content">
              <div class="title">网络扫描和嗅探工具Nmap</div>
            </div>
          </li>
          <li class="list-item">
            <div class="content">
              <div class="title">抓包工具BurpSuite</div>
            </div>
          </li>
        </ul>
      </div>
    </div>
    <div
      class="section"
      style="background-image: none; background-color: #f7f7f7"
    >
      <div class="wrapper">
        <h2 id="pglc" class="section-title">风险评估流程</h2>
        <div class="section-content">
          <div style="text-align: center">
            <img src="@/assets/img/infosafet1.png" style="width: 70%" alt="" />
          </div>
        </div>
      </div>
    </div>
    <div class="section" style="background-image: none">
      <div class="wrapper">
        <h2 id="cswd" class="section-title">输出文档</h2>
        <ul class="list-wrapper">
          <li class="list-item">
            <div class="content">
              <div class="title">风险评估方案</div>
            </div>
          </li>
          <li class="list-item">
            <div class="content">
              <div class="title">风险评估报告</div>
            </div>
          </li>
        </ul>
      </div>
    </div>
    <div class="anchor">
      <el-anchor :offset="70">
        <el-anchor-link
          title="yjbz"
          class="ant-anchor-ink"
          @click="goAnchor('#yjbz')"
        >
          依据标准
        </el-anchor-link>
        <el-anchor-link
          title="pgff"
          class="ant-anchor-ink"
          @click="goAnchor('#pgff')"
        >
          风险评估方法
        </el-anchor-link>
        <el-anchor-link
          title="pggj"
          class="ant-anchor-ink"
          @click="goAnchor('#pggj')"
        >
          风险评估工具
        </el-anchor-link>
        <el-anchor-link
          title="pglc"
          class="ant-anchor-ink"
          @click="goAnchor('#pglc')"
        >
          风险评估流程
        </el-anchor-link>
        <el-anchor-link
          title="cswd"
          class="ant-anchor-ink"
          @click="goAnchor('#cswd')"
        >
          输出文档
        </el-anchor-link>
      </el-anchor>
    </div>
  </div>
  <!-- 创建订单 -->
  <CreateForm ref="formRef" />
</template>

<script setup>
import { ref, computed, defineEmits } from "vue";
import { useUserStore } from "@/store/modules/user";
import CreateForm from "../CreateForm.vue";
import { ElMessage } from "element-plus";
const userStore = useUserStore();
const userInfo = computed(() => userStore.userInfo);
const goAnchor = (selector) => {
  document.querySelector(selector).scrollIntoView({
    behavior: "smooth",
  });
};
/** 创建订单 */
const formRef = ref();
const openForm = () => {
  if (userInfo.value) {
    formRef.value.opendialog(8);
  } else {
    ElMessage({ message: "请先进行用户登录！", type: "warning" });
    userStore.setisShowLogin(true);
  }
};
</script>

<style lang="scss" scope>
.infosafet {
  margin-top: 60px;

  .theme {
    height: 626px;
    width: 100%;
    background: #f7f7f7;
    background-image: url("@/assets/img/bac.jpg");
    background-size: 100% 100%;

    .banner-button {
      width: 12%;
    }

    .wrapper {
      margin: 0 auto;
      max-width: 1232px;
      padding: 167px 16px 0;
      position: relative;
      width: 100%;

      .title {
        color: #333;
        display: inline-block;
        font-size: 42px;
        font-weight: 700;
        margin-bottom: 12px;
        position: relative;
      }

      .desc {
        color: #333;
        font-size: 20px;
        font-weight: 400;
        line-height: 36px;
        margin-bottom: 40px;
        max-width: 680px;
      }
    }
  }

  .section {
    width: 100%;
    background: #fff;
    padding-bottom: 100px;
    background-image: url("@/assets/img/1d0799d2.png");
    background-size: 100% 100%;

    .wrapper {
      height: 100%;
      margin: 0 auto;
      max-width: 1232px;
      padding: 80px 16px 0;

      .section-title {
        margin-bottom: 50px;
        padding: 0 10px;
        color: #000;
        font-size: 32px;
        font-weight: 500;
        margin-bottom: 60px;
        text-align: center;
      }

      .section-content {
        zoom: 1;
        box-sizing: border-box;
        display: block;
        height: auto;
        margin-left: 0;
        margin-right: 0;
        position: relative;
        background-color: #fff;
        box-shadow: 0 20px 60px 0 rgba(0, 0, 0, 0.1);
        padding: 30px;

        .sub-title {
          color: #000;
          font-size: 20px;
          font-weight: 500;
          margin: 30px 0 10px;
        }

        .sub-desc {
          color: #666;
          font-size: 14px;
          line-height: 24px;
          margin-bottom: 30px;
          white-space: pre-line;
        }
      }

      .section-row {
        display: flex;
        flex-flow: row wrap;
        margin: -30px -45px;

        .content-wrapper {
          box-sizing: border-box;
          display: block;
          width: 50%;
          padding: 30px 45px;
          box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.1);

          .item {
            padding: 0 10px;

            .sub-title {
              color: #000;
              font-size: 20px;
              font-weight: 500;
              margin-bottom: 11px;
              position: relative;
            }

            .sub-title:before {
              background: #0074ff;
              content: "";
              height: 20px;
              left: -10px;
              position: absolute;
              top: 50%;
              transform: translateY(-50%);
              width: 2px;
            }

            .sub-desc {
              color: #666;
              font-size: 16px;
              line-height: 28px;
              margin: 0;
              white-space: pre-line;
            }
          }
        }
      }

      .list-wrapper {
        display: flex;
        justify-content: center;
        margin: 0 -16px;

        .list-item {
          border: 1px solid #e7e7e7;
          border-radius: 4px;
          cursor: pointer;
          display: flex;
          margin: 0 16px 16px;
          min-height: 30px;
          padding: 15px;

          .content {
            flex: 1;

            .title {
              align-items: center;
              display: flex;
              justify-content: space-between;
            }

            .title:before {
              background: #0074ff;
              content: "";
              height: 15px;
              left: -10px;
              position: relative;
              top: 10px;
              transform: translateY(-50%);
              width: 5px;
            }
          }
        }

        .list-item:hover {
          box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.1);
        }
      }
    }
  }

  .anchor {
    position: fixed;
    width: 6%;
    top: 25%;
    left: 5%;
    // transform: translateX(-860px);
    padding: 5px;
    border-radius: 4px;
    background-color: rgb(255, 255, 255);
    box-sizing: border-box;
    box-shadow: 0 5px 16px 0 rgba(0, 0, 0, 0.1);
  }
}
</style>
